//
//  NovelDetailVC.m
//  ChineseCollegeStudentsNetwork
//
//  Created by Zheng on 2019/3/21.
//  Copyright © 2019 刘喆. All rights reserved.
//

#import "NovelDetailVC.h"
#import <WebKit/WebKit.h>

@interface NovelDetailVC ()

@end

@implementation NovelDetailVC {
    WKWebView *webView;
    UILabel *titleLbl;
}

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.title = @"中国大学生网";
    
    titleLbl = [[UILabel alloc] init];
    titleLbl.font = [UIFont systemFontOfSize:17];
    titleLbl.text = _titleStr;
    titleLbl.textAlignment = NSTextAlignmentCenter;
    [self.view addSubview:titleLbl];
    [titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(12);
        make.right.offset(-12);
        make.top.offset(10);
    }];
    
    webView = [[WKWebView alloc] initWithFrame:CGRectZero];
    [self.view addSubview:webView];
    [webView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.offset(0);
        make.left.offset(12);
        make.right.offset(-12);
        make.top.equalTo(self->titleLbl.mas_bottom);
    }];
    
    [webView loadHTMLString:_contentStr baseURL:nil];
}





@end
